Ad Widget

Collapse

"like" in actions=>conditions – how to match smh\d{1,}-\d{1,}-ex.com?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hryamzik
    Junior Member
    • Dec 2011
    • 16

    #1

    "like" in actions=>conditions – how to match smh\d{1,}-\d{1,}-ex.com?

    I'm trying to create an action condition with a like statement. Hosts should suite the following regexp:
    Code:
    smh\d{1,}-\d{1,}-ex.com
    I've tried:
    Code:
    smh*ex.com
    smh.*ex.com
    smh??-?-ex.com
    @likeRegexp
    Last one is a custom regexp, mapped to the one I've mentioned earlier. Non works. What am I doing wrong?
  • BDiE8VNy
    Senior Member
    • Apr 2010
    • 680

    #2
    Wherever 'like' is used in frontend it filters for values that contain a string.
    These filter options don't support any wildcards or even regular expressions.

    In general the API "get" method parameter 'search' is used:
    Accepts an array, where the keys are property names, and the values are strings to search for. If no additional options are given, this will perform a LIKE ”%…%” search.

    But you could create a corresponding trigger based on regexp() trigger function and consider these triggers instead in your action condition.
    Last edited by BDiE8VNy; 03-08-2014, 20:54.

    Comment

    • hryamzik
      Junior Member
      • Dec 2011
      • 16

      #3
      In fact I've found a workaround: you can add multiple like conditions with an AND concatination.

      Comment

      Working...